home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-15 / pcwkbn12.zip / LANPERF.DOC < prev    next >
Text File  |  1990-10-24  |  11KB  |  252 lines

  1.  
  2.                              PC Week
  3.                  LAN Performance Test (LANPERF)
  4.                            Version 1.1
  5.  
  6. LANPERF is designed to provide a load-generation and load-
  7. measurement tool for LANs.  Two tests are provided: READ and
  8. WRITE.  The READ test performs DOS file reads from a disk file
  9. for a fixed period of time.  The file is read sequentially from
  10. beginning to end.  Once the end-of-file has been reached, reading
  11. restarts from the beginning of the file.  In a similar way, the
  12. WRITE test performs DOS file writes to a file.
  13.  
  14. The READ and WRITE tests are parameterized to allow flexibility
  15. in how the tests are performed.  Options can be used to vary the
  16. length of the test, the number of bytes in each block read or
  17. written, the size of the file used in the test, and the DOS file
  18. sharing mode.
  19.  
  20. Many LANs use local or remote disk caching to increase
  21. performance, and the setting of the block size, file size, and
  22. file sharing mode can make significant differences in the ability
  23. of the LAN operating system to cache disk blocks.
  24.  
  25.  
  26. RUNNING LANPERF
  27.  
  28. If you run LANPERF without any parameters, it will print a short
  29. help message that describes the available options:
  30.  
  31.  t# - test length (seconds) (10-65535) 
  32.  b# - block size (in bytes) (1-65535) 
  33.  f# - file size (in blocks) (1-65535) 
  34.  w  - do sequential write test 
  35.  r  - do sequential read test 
  36.  dM - file sharing mode 
  37.   ^ modes to deny (r w rw n c) 
  38.  x  - use defaults:  t60 b512 f64 r w dc 
  39.  
  40.  
  41. A default scenario can be selected by invoking LANPERF with the
  42. "x" option.  This selects a 60-second test time, 512-byte block
  43. size, 64-block file size, and the compatibility file-sharing
  44. mode.  Both the READ and WRITE tests will be performed.  A single
  45. default option can be individually overridden.  If an option is
  46. not specified on the command line, it will be set at its default.
  47.  
  48. When selecting options, remember that a large file may be created
  49. by LANPERF if large numbers are chosen for the block size and
  50. file size.  For example, specifying "b1024 f16384" will create a
  51. 16MB file.  Ten stations running LANPERF concurrently with these
  52. options would require 320MB of disk space on the server.
  53.  
  54. Since most non-LAN programs use the file-sharing compatibility
  55. mode, that mode is used as the default for LANPERF.  The other
  56. modes (deny read, deny write, deny read/write, and deny none)
  57. specify the access allowed subsequent users.  On Novell Netware,
  58. the file-sharing function is provided by Netware itself;  other
  59. networks may have to load the SHARE.EXE program provided with
  60. DOS.
  61.  
  62.  
  63. UNATTENDED OPERATION
  64.  
  65. Since LANPERF causes heavy load on a network, users of a
  66. production network may not appreciate it being used while they
  67. are trying to work.  Load caused by users will also affect
  68. LANPERF results, making them hard to reproduce.  An alternative
  69. is to run LANPERF after normal working hours, using unattended
  70. operation.  To do this, create a batch file that contains
  71. multiple LANPERF commands, using whatever options are desired. 
  72. Output from LANPERF can also be redirected to a file.  Redirect
  73. the input of LANPERF to NUL, the null device. This will cause
  74. LANPERF to start immediately, rather than waiting for a key to be
  75. pressed.  A sample batch file is shown below:
  76.  
  77.      rem Batch file for LANPERF runs
  78.      echo LANPERF Test Results            >RESULTS.OUT
  79.      LANPERF t30 b64  f10 r w drw  <NUL: >>RESULTS.OUT
  80.      LANPERF t30 b256 f10 r w drw  <NUL: >>RESULTS.OUT
  81.      LANPERF t30 b512 f10 r w drw  <NUL: >>RESULTS.OUT
  82.  
  83.  
  84. INTERPRETING LANPERF RESULTS
  85.  
  86. The output from a run of LANPERF will look similar to the
  87. following:
  88.  
  89. LANPERF Version 1.1 
  90. PC Week LAN Performance Test 
  91. Copyright (c) 1989, Ziff-Davis Publishing Company 
  92.  
  93. Test time  : 10 seconds 
  94. Block size : 512 bytes 
  95. File size  : 64 blocks (32768 bytes) 
  96. Sharing    : Compatibility 
  97.  
  98. ===> PRESS A KEY ON ANY STATION TO START <=== 
  99.  
  100.            Total     Mean Response  Throughput 
  101. Test     Operations    Time (ms)      (KB/s) 
  102. ----     ----------  -------------  ---------- 
  103. WRITE  :    1153         8.673         57.65 
  104. READ   :    1725         5.797         86.25 
  105.  
  106. For both the READ and WRITE tests, total throughput for the
  107. workstation is calculated as a function of the number of
  108. operations, block size in each operation, and the test time:
  109.  
  110.                           Operations * Block_Size
  111.      Station Throughput = -----------------------
  112.                               Test Duration
  113.  
  114. Results are reported in kilobytes per second (KB/s).
  115.  
  116. Mean response time is the average time required to complete one
  117. read or write operation, and is reported in milliseconds (ms). 
  118. It is calculated as:
  119.  
  120.                           Test Duration
  121.      Mean Response Time = -------------
  122.                            Operations
  123.  
  124.  
  125. APPLYING LANPERF
  126.  
  127. Throughput and response time are affected by the many software
  128. and hardware components that intervene between the workstation
  129. and server.  Only a few of those components will be pivotal in
  130. determining LAN performance.  
  131.  
  132. Although LANPERF is primarily designed for testing LAN
  133. performance, it has no LAN-specific code that prevents it from
  134. running on a non-LAN PC.  A useful starting point when using
  135. LANPERF is to measure the performance of a PC, not connected to
  136. the network, when doing I/O to a RAM disk.  Tests on a hard disk,
  137. with and without disk caching, can also be valuable as baseline
  138. measurements to determine the overhead added by the network. 
  139. Suggestions for possible tests are described below.
  140.  
  141. Redirector overhead
  142.  
  143. The redirector (network shell) increases the overhead even for
  144. local disk operations, since each I/O request must be examined to
  145. determine if it should be sent to the network.  The additional
  146. load can be measured by running an identical LANPERF test on a
  147. local disk with and without the redirector loaded.
  148.  
  149. Approximating load times
  150.  
  151. The results from the READ test can be used to estimate the time
  152. it will take to load a program or read a data file.  For example,
  153. if the station throughput is 200KB/s, a 300KB file will take
  154. approximately 1.5 seconds to load.
  155.  
  156. Maximum server throughput
  157.  
  158. A single LANPERF run on one workstation with an otherwise-idle
  159. network will give the station throughput.  However, a single
  160. station is usually not able to maintain a full load on the
  161. server.  If successive tests are run with additional stations, a
  162. point will be reached where the sum of the station throughput
  163. results does not increase; it may even decrease.  This point is
  164. the maximum server throughput, and can be used as an upper bound
  165. on single-server data delivery.
  166.  
  167. Maximum LAN throughput
  168.  
  169. In a multiple-server environment, LANPERF tests can be run on
  170. both servers simultaneously.  The sum of the station throughput
  171. results gives the maximum LAN throughput.  If single-server and
  172. multiple-server results are very close, the media may be
  173. saturated already.
  174.  
  175. Tuning the LAN
  176.  
  177. Server parameters such as cache size are often difficult to set.
  178. LANPERF can be used to measure performance differences in
  179. parameter settings.  Remember, however, that LANPERF does only
  180. sequential reads and writes;  applications that perform random
  181. I/O may have very different effects on cache performance.
  182.  
  183. Stress testing
  184.  
  185. Many LANs are lightly loaded, especially during their early life. 
  186. Problems in performance, or outright crashes, might occur only
  187. sporadically, or might not show up until the LAN is expanded to a
  188. production size and is handling critical applications.  LANPERF
  189. can generate a load on the LAN to simulate heavy use by multiple
  190. users.
  191.  
  192.  
  193. LANPERF INTERNALS
  194.  
  195. LANPERF's main program is written in C; it does parameter
  196. decoding, verification, and results display.  To obtain best
  197. performance and avoid variations that might be introduced by
  198. different C compiler run-time libraries, the READ and WRITE test
  199. code is written in assembly language.  None of the time-critical
  200. test code is contained in the main program.
  201.  
  202. When a copy of LANPERF is started on a workstation, it waits for
  203. one of two things to happen.  First, it looks for a key being
  204. pressed on the local workstation.  If a key has been pressed,
  205. LANPERF will create the file LANPERF.GO in the current directory
  206. and start the test.  If a key has not been pressed locally,
  207. LANPERF will look for the file LANPERF.GO in the current
  208. directory.  If the file is present, LANPERF will start the test. 
  209. Thus, the LANPERF.GO file acts as a starting gun for all copies
  210. of LANPERF started in the same directory.
  211.  
  212. Once the test has completed, the workstation that created the
  213. LANPERF.GO file will delete it.  If LANPERF is terminated
  214. abnormally from a system boot or crash, the LANPERF.GO file will
  215. remain, and MUST be deleted manually.  If the file is not
  216. deleted, subsequent runs of LANPERF will start immediately
  217. without waiting for a key.
  218.  
  219. Regardless of the setting of the file-sharing option, each
  220. LANPERF running on a separate station creates and uses its own
  221. private file for performing the READ and WRITE test.  This file
  222. usually has a name something like $T000019, and might also be
  223. left behind if LANPERF is terminated abnormally. It should be
  224. deleted.
  225.  
  226. The WRITE test first creates a temporary file using DOS function
  227. 5Ah, then closes it.  The newly-created temporary file is then
  228. reopened for read/write access using DOS function 3Dh.  This
  229. roundabout method is used because function 5Ah always opens the
  230. file in compatibility mode; it does not provide a way to specify
  231. the newer DOS 3.1 sharing modes.
  232.  
  233. Blocks of data are sequentially written to the file, and a
  234. counter is incremented at each operation.  When the specified
  235. file size has been reached, the file pointer is reset to the
  236. beginning of the file, and write operations are resumed.  After
  237. each block has been written, the BIOS clock is checked to see if
  238. the test time is up.  Upon completion, the temporary file is
  239. deleted.
  240.  
  241. The READ test also creates a temporary file using DOS function
  242. 5Ah, and fills it with data to be read by the test.  In all other
  243. respects, the READ test proceeds in the same way as the WRITE
  244. test.
  245.  
  246. Both the READ and WRITE tests change the data in the blocks
  247. written to the file so that no two successive blocks of data are
  248. the same.  This defeats caching schemes in some LAN operating
  249. systems that recognize and avoid writing data that has not
  250. changed.
  251.  
  252.